package cn.e3mall;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import cn.e3.common.jedis.JedisClientPool;
import redis.clients.jedis.JedisPool;

@SpringBootApplication
public class SSOSerApp {
	
	@Value("${spring.redis.host}")
	String redisHost;
	
	@Value("${spring.redis.port}")
	int redisPort;
	
	@Bean("jedisClientPool")
	public JedisClientPool getJedisClientPool(){
		return new JedisClientPool();
	}
	
	@Bean("jedisPool")
	public JedisPool getJedisPool(){
		return new JedisPool(redisHost,redisPort);
	}
	
	public static void main(String[] args) {
		SpringApplication.run(SSOSerApp.class, args);
	}
	

}
